/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.rcnss.ui.form;
import com.rcnss.data.Intervention;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.DefaultFieldFactory;
import com.vaadin.ui.Panel;
/**
 *
 * @author Guesmi
 */
public class ChangeReclamationForm extends AbstractForm {
    private Intervention inter = null;

    public ChangeReclamationForm(int rec_id)
    {
        Panel p = new Panel();
        p.setSizeFull();

        inter = Intervention.SearchByRecID(rec_id).isEmpty()?null:Intervention.SearchByRecID(rec_id).get(0);

        EditForm r = new EditForm(inter, DefaultFieldFactory.get());
        r.setCaption("Intervention");
        p.addComponent(r);
        this.root.addComponent(p);
        this.root.setComponentAlignment(p, Alignment.MIDDLE_CENTER);
    }
}
